64de3743f33bd1516aa02b8fd4dc9855c7223ce4,src/test/java/net/imagej/ops/image/distancetransform/DistanceTransform3DTest.java,DistanceTransform3DTest,test,#,50

Before Change


	@Test
	public void test() {
		// create 3D image
		Img<BitType> in = ops.convert().bit(ops.create().img(new int[] { 30, 30, 5 }));
		generate3DImg(in);

		// output of DT ops

After Change


	@Test
	public void test() {
		// create 3D image
		final RandomAccessibleInterval<BitType> in = ops.create().img(new FinalInterval(20, 20, 5), new BitType());
		generate3DImg(in);

		/*
		 * test normal DT
		 */
		RandomAccessibleInterval<FloatType> out = (RandomAccessibleInterval<FloatType>) ops
				.run(DistanceTransform3D.class, null, in);
		compareResults(out, in, new double[] { 1, 1, 1 });

		/*
		 * test calibrated DT
		 */
		final double[] calibration = new double[] { 3.74, 5.19, 1.21 };
		out = (RandomAccessibleInterval<FloatType>) ops.run(DistanceTransform3DCalibration.class, null, in,
				calibration);
		compareResults(out, in, calibration);
	}